
import ajax from "../../utils/ajax";
const form = document.forms[0]

form.onsubmit = function (e) {
    e.preventDefault();
    ajax('post', '/api/reg', {
        username: form.username.value, password: form.password.value
    }).then(result => alert(result.msg))
}
